#pragma once

#include <d3d9.h>
#include <d3dx9.h>
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")

class Direct3D_AL
{
public:
	IDirect3D9			*m_pD3D;
	IDirect3DDevice9	*m_pD3DDev;
	ID3DXSprite			*m_pSpriteManager;

	HINSTANCE			m_pHInstance;
	HWND				m_pHWND;

	int					m_nWindowWidth,
						m_nWindowHeight;



	/*No Default constructor. You NEED to have the hInstance in order 
	to create an instance of this class.
	
	
	First call InitializeWindow
	Then call InitializeDirectX later in the application*/
	Direct3D_AL();
	~Direct3D_AL();
	
	void Init(HINSTANCE _HInstance, int _nWindowWidth = 1024, int _nWindowHeight = 768);
	static Direct3D_AL* GetInstance();
	 
	/*Will return if it has successfully created the window or not.*/
	bool InitializeWindow(WNDPROC _pWndProc);
	void InitializeDirectX(bool _bWindowed = true);
};

